package ex01;



public class Shui {

	public static void main(String[] args) {

		int a,b=0,i,sum;
		for(i=1;i<=10000;i++){
			sum=0;
			b=i;
			while(b!=0){
			a=b%10;
			sum+=a*a*a;
			b=b/10;
			}
			if(sum==i&&i!=1){
				System.out.print("  "+i);
			}
		}
	}

}